<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>EDS API: eds::arch::ArchClient Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">EDS API
   </div>
   <div id="projectbrief">Enterprise Data Server Application Programming Interface</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classeds_1_1arch_1_1_arch_client.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classeds_1_1arch_1_1_arch_client-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">eds::arch::ArchClient Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Archive data client.  
 <a href="classeds_1_1arch_1_1_arch_client.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_arch_client_8h_source.html">ArchClient.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a98f6a33c978abd84d358ea91dff86617"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a98f6a33c978abd84d358ea91dff86617">ArchClient</a> (const char *version)</td></tr>
<tr class="memdesc:a98f6a33c978abd84d358ea91dff86617"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an archive client for specified server version.  <a href="#a98f6a33c978abd84d358ea91dff86617"></a><br/></td></tr>
<tr class="memitem:ac39f7115de82d29a11418c899363acb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#ac39f7115de82d29a11418c899363acb6">setupLogger</a> (const char *str)</td></tr>
<tr class="memdesc:ac39f7115de82d29a11418c899363acb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes logger parameters.  <a href="#ac39f7115de82d29a11418c899363acb6"></a><br/></td></tr>
<tr class="memitem:af838405cffeebbcdc87a94e267f61a2a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#af838405cffeebbcdc87a94e267f61a2a">init</a> (const char *lhost, <a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a> lport, const char *rhost, <a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a> rport, <a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a> lport_range, <a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a> max_packet=32767)</td></tr>
<tr class="memdesc:af838405cffeebbcdc87a94e267f61a2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes connection to an archive server.  <a href="#af838405cffeebbcdc87a94e267f61a2a"></a><br/></td></tr>
<tr class="memitem:a72e19ab691ec3bb40bf41e3d295f2d07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a72e19ab691ec3bb40bf41e3d295f2d07">shut</a> ()</td></tr>
<tr class="memdesc:a72e19ab691ec3bb40bf41e3d295f2d07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes connection to Archive Server.  <a href="#a72e19ab691ec3bb40bf41e3d295f2d07"></a><br/></td></tr>
<tr class="memitem:ac9b00c857800aa598fcfa77d4fa4cef6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#ac9b00c857800aa598fcfa77d4fa4cef6">clear</a> ()</td></tr>
<tr class="memdesc:ac9b00c857800aa598fcfa77d4fa4cef6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Discards all previously created requests from <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a>.  <a href="#ac9b00c857800aa598fcfa77d4fa4cef6"></a><br/></td></tr>
<tr class="memitem:a3045813bcff66347f010d790c6a1f992"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeds_1_1arch_1_1_report_function.html">ReportFunction</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a3045813bcff66347f010d790c6a1f992">getReportFunction</a> (const char *name)</td></tr>
<tr class="memdesc:a3045813bcff66347f010d790c6a1f992"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classeds_1_1arch_1_1_report_function.html" title="Represents a report function with its parameters.">ReportFunction</a> object for a specific raw or aggregate Archive Server function.  <a href="#a3045813bcff66347f010d790c6a1f992"></a><br/></td></tr>
<tr class="memitem:a3cb2b8c876b7c2d1496080dbaf712e81"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceeds_1_1arch.html#adb7d936aef93f979ef55a002c2911636">QueryId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a3cb2b8c876b7c2d1496080dbaf712e81">addQuery</a> (<a class="el" href="classeds_1_1arch_1_1_report_function.html">ReportFunction</a> *function)</td></tr>
<tr class="memdesc:a3cb2b8c876b7c2d1496080dbaf712e81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enqueues a report function for execution.  <a href="#a3cb2b8c876b7c2d1496080dbaf712e81"></a><br/></td></tr>
<tr class="memitem:ad492c5a85f5026d7e601981269520d93"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#ad492c5a85f5026d7e601981269520d93">getResponse</a> (<a class="el" href="namespaceeds_1_1arch.html#adb7d936aef93f979ef55a002c2911636">QueryId</a> id, char *quality)</td></tr>
<tr class="memdesc:ad492c5a85f5026d7e601981269520d93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads result (value, quality) from given report query id.  <a href="#ad492c5a85f5026d7e601981269520d93"></a><br/></td></tr>
<tr class="memitem:ab4a3dd61df80a139b8790a3a2b600a23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#ab4a3dd61df80a139b8790a3a2b600a23">executeQueries</a> ()</td></tr>
<tr class="memdesc:ab4a3dd61df80a139b8790a3a2b600a23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes all queued report functions.  <a href="#ab4a3dd61df80a139b8790a3a2b600a23"></a><br/></td></tr>
<tr class="memitem:a98a7485bf71aa908cb4892aa821590a5"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a98a7485bf71aa908cb4892aa821590a5">executeQuery</a> (<a class="el" href="classeds_1_1arch_1_1_report_function.html">ReportFunction</a> *function, char *quality)</td></tr>
<tr class="memdesc:a98a7485bf71aa908cb4892aa821590a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queues, executes and gets response from a single report function.  <a href="#a98a7485bf71aa908cb4892aa821590a5"></a><br/></td></tr>
<tr class="memitem:a744cb3bb325e6b9c2d84cb67a299c6cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeds_1_1arch_1_1_tabular_trend.html">TabularTrend</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a744cb3bb325e6b9c2d84cb67a299c6cb">getTabularTrend</a> (int sid, const char *function)</td></tr>
<tr class="memdesc:a744cb3bb325e6b9c2d84cb67a299c6cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="classeds_1_1arch_1_1_tabular_trend.html" title="Represents a tabular trend with its parameters.">TabularTrend</a> object for a specific point and archive function.  <a href="#a744cb3bb325e6b9c2d84cb67a299c6cb"></a><br/></td></tr>
<tr class="memitem:a6f576744e47f6625350963eedc16c93a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a6f576744e47f6625350963eedc16c93a">addTabularTrend</a> (<a class="el" href="classeds_1_1arch_1_1_tabular_trend.html">TabularTrend</a> *trend, unsigned char shade_mode=<a class="el" href="namespaceeds_1_1arch.html#a32e2fe0d83ab8f76bae8606995802373a7dfe4c28bb1e82c47a370c8ea6c976ca">ShadeMode_PreferRegular</a>)</td></tr>
<tr class="memdesc:a6f576744e47f6625350963eedc16c93a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enqueues a tabular trend for execution.  <a href="#a6f576744e47f6625350963eedc16c93a"></a><br/></td></tr>
<tr class="memitem:ad5df00ccc3877637c449d2f609ac42ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#ad5df00ccc3877637c449d2f609ac42ac">executeTabularTrends</a> (std::time_t ref_time, long range, long step)</td></tr>
<tr class="memdesc:ad5df00ccc3877637c449d2f609ac42ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes all queued tabular trends.  <a href="#ad5df00ccc3877637c449d2f609ac42ac"></a><br/></td></tr>
<tr class="memitem:a4a847796aea1483260664dfd30d6c5fc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a4a847796aea1483260664dfd30d6c5fc">fetchTabularTrendRow</a> (<a class="el" href="namespaceeds_1_1arch.html#a1401dd12e8bc228f41b1688b4395d55b">TabularTrendRow</a> *row)</td></tr>
<tr class="memdesc:a4a847796aea1483260664dfd30d6c5fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetches a row of data from tabular trend and advances to the next row.  <a href="#a4a847796aea1483260664dfd30d6c5fc"></a><br/></td></tr>
<tr class="memitem:ad77604a1935e3570802ce3e29ee48969"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#ad77604a1935e3570802ce3e29ee48969">addShadeValue</a> (int sid, std::time_t start_ts, std::time_t end_ts, float value, char quality)</td></tr>
<tr class="memdesc:ad77604a1935e3570802ce3e29ee48969"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enqueues a shade to be written.  <a href="#ad77604a1935e3570802ce3e29ee48969"></a><br/></td></tr>
<tr class="memitem:a4b4bd14fe7ae649f86693357f9d3a0d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeds_1_1arch_1_1_arch_client.html#a4b4bd14fe7ae649f86693357f9d3a0d1">writeShades</a> ()</td></tr>
<tr class="memdesc:a4b4bd14fe7ae649f86693357f9d3a0d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes all queued shades.  <a href="#a4b4bd14fe7ae649f86693357f9d3a0d1"></a><br/></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Archive data client. </p>
<p>Objects of this class allow retrieval and updating of archive data stored on EDS Archive Server.</p>
<p><a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> supports three different types of archive objects:</p>
<ul>
<li>reports - provide raw or aggregated historical data for a specific moment in time (single timestamp)</li>
<li>tabular trends - provide raw or aggregated historical data for a specific time interval (timestamp range)</li>
<li>shades - allow to provide alternative historical data (through substitution or extension of actual archived data)</li>
</ul>
<p><a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> allows to queue several requests of the same type and execute them in batches. However, simultaneously registering requests for different types of archive objects is not supported. Always call <a class="el" href="classeds_1_1arch_1_1_arch_client.html#ac9b00c857800aa598fcfa77d4fa4cef6" title="Discards all previously created requests from ArchClient.">clear()</a> before requesting <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> to work on a different type of archive object.</p>
<p>Only one archive backend can be loaded at any time. Do not create multiple <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> objects with different values of <em>version</em> parameter. Multiple <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> objects with the same <em>version</em> are allowed.</p>
<p>Most methods of this class may throw exceptions:</p>
<ul>
<li><a class="el" href="classeds_1_1arch_1_1_arch_client_error.html" title="Thrown when backend library returns an error.">ArchClientError</a> - backend library returned an error. Use <a class="el" href="classeds_1_1arch_1_1_arch_client_error.html#a1f687bda0aab93ad6081ee4e17b4015e" title="Numeric error code.">ArchClientError::errorCode()</a> to get more information on error type.</li>
<li><a class="el" href="classeds_1_1_uninitialized_client_error.html" title="Uninitialized client exception class.">UninitializedClientError</a> - <a class="el" href="classeds_1_1arch_1_1_arch_client.html#af838405cffeebbcdc87a94e267f61a2a" title="Initializes connection to an archive server.">init()</a> method was not called or <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> was disconnected using <a class="el" href="classeds_1_1arch_1_1_arch_client.html#a72e19ab691ec3bb40bf41e3d295f2d07" title="Closes connection to Archive Server.">shut()</a> method.</li>
<li><a class="el" href="classeds_1_1_unsupported_function_error.html" title="Unsupported function exception class.">UnsupportedFunctionError</a> - called method is not supported by currently loaded backend. This usually happens when feature was not available in that particular EDS version.</li>
</ul>
<p>Methods of this class are not thread safe and can be called from one thread only. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#_a7">ArchClient.cpp</a>.</dd>
</dl></div><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a98f6a33c978abd84d358ea91dff86617"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">eds::arch::ArchClient::ArchClient </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>version</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an archive client for specified server version. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">version</td><td>- version of backend to load (in dotted notation, e.g. <em>"9.1"</em>) </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classeds_1_1_backend_not_found_error.html" title="Backend not found exception class.">BackendNotFoundError</a></td><td>- thrown when specified backend could not be loaded </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2>Member Function Documentation</h2>
<a class="anchor" id="ac39f7115de82d29a11418c899363acb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::setupLogger </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes logger parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>- options string for logger (using common EDS syntax) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>The options string follows the same format used in all EDS applications. For example, to log all messages to console, pass the following parameter string: <code>"debug=7 subsystems=ALL logger=console:7"</code>. </p>

</div>
</div>
<a class="anchor" id="af838405cffeebbcdc87a94e267f61a2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::init </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>lhost</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a>&#160;</td>
          <td class="paramname"><em>lport</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>rhost</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a>&#160;</td>
          <td class="paramname"><em>rport</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a>&#160;</td>
          <td class="paramname"><em>lport_range</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceeds.html#af2be53330cf9b9d95d300ae0c792309f">word</a>&#160;</td>
          <td class="paramname"><em>max_packet</em> = <code>32767</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes connection to an archive server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">lhost</td><td>- local host (specify <em>"0.0.0.0"</em> to bind to all local network interfaces) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lport</td><td>- local port (specify <em>0</em> to bind to any free port) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhost</td><td>- Archive Server host to connect to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rport</td><td>- Archive Server port to connect to (typically <em>43001</em>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lport_range</td><td>- if <code>lport</code> is already taken, try binding with up to <code>lport_range</code> ports higher than that port number </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">max_packet</td><td>- maximum allowed UDP packet size (sometimes needed to circumvent network routing limitations) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3 </dd></dl>

</div>
</div>
<a class="anchor" id="a72e19ab691ec3bb40bf41e3d295f2d07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::shut </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Closes connection to Archive Server. </p>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>No methods except <a class="el" href="classeds_1_1arch_1_1_arch_client.html#af838405cffeebbcdc87a94e267f61a2a" title="Initializes connection to an archive server.">init()</a> may be called afterwards. </p>

</div>
</div>
<a class="anchor" id="ac9b00c857800aa598fcfa77d4fa4cef6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Discards all previously created requests from <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a>. </p>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>This method must be called when switching between different types of archive objects (i.e. reports, trends and shades). </p>

</div>
</div>
<a class="anchor" id="a3045813bcff66347f010d790c6a1f992"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classeds_1_1arch_1_1_report_function.html">ReportFunction</a>* eds::arch::ArchClient::getReportFunction </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a <a class="el" href="classeds_1_1arch_1_1_report_function.html" title="Represents a report function with its parameters.">ReportFunction</a> object for a specific raw or aggregate Archive Server function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>- name of archive function to create (e.g. <em>VALUE</em>, <em>AVG</em>). Please consult EDS Terminal documentation for a list of available archive functions (remove the leading '@' character from function name). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>new <a class="el" href="classeds_1_1arch_1_1_report_function.html" title="Represents a report function with its parameters.">ReportFunction</a> object </dd></dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>Ownership of the created <a class="el" href="classeds_1_1arch_1_1_report_function.html" title="Represents a report function with its parameters.">ReportFunction</a> object is transferred to the caller. It must be released using the <code>delete</code> operator. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a9">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3cb2b8c876b7c2d1496080dbaf712e81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceeds_1_1arch.html#adb7d936aef93f979ef55a002c2911636">QueryId</a> eds::arch::ArchClient::addQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classeds_1_1arch_1_1_report_function.html">ReportFunction</a> *&#160;</td>
          <td class="paramname"><em>function</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enqueues a report function for execution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">function</td><td>- report function to execute </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>report query identifier for fetching result </dd></dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>Passed <a class="el" href="classeds_1_1arch_1_1_report_function.html" title="Represents a report function with its parameters.">ReportFunction</a> object must be already initialized with appropriate report parameters. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a11">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad492c5a85f5026d7e601981269520d93"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double eds::arch::ArchClient::getResponse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceeds_1_1arch.html#adb7d936aef93f979ef55a002c2911636">QueryId</a>&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>quality</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads result (value, quality) from given report query id. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>- report query identifier </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">quality</td><td>- quality of returned value (typically one of <a class="el" href="namespaceeds.html#a5f271e56272e078dc4030f4ad0d22d8d" title="Point quality.">eds::Quality</a> enumerations) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>calculated value of report function </dd></dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>Note that this function may be called only when <a class="el" href="classeds_1_1arch_1_1_arch_client.html#ab4a3dd61df80a139b8790a3a2b600a23" title="Executes all queued report functions.">executeQueries()</a> finished successfully. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a13">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab4a3dd61df80a139b8790a3a2b600a23"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::executeQueries </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes all queued report functions. </p>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3 </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a12">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a98a7485bf71aa908cb4892aa821590a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double eds::arch::ArchClient::executeQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classeds_1_1arch_1_1_report_function.html">ReportFunction</a> *&#160;</td>
          <td class="paramname"><em>function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>quality</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Queues, executes and gets response from a single report function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">function</td><td>- report function to execute </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">quality</td><td>- quality of returned value (typically one of <a class="el" href="namespaceeds.html#a5f271e56272e078dc4030f4ad0d22d8d" title="Point quality.">eds::Quality</a> enumerations) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>calculated value of report function </dd></dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>This is a convenience overload which combines functionality of <a class="el" href="classeds_1_1arch_1_1_arch_client.html#a3cb2b8c876b7c2d1496080dbaf712e81" title="Enqueues a report function for execution.">addQuery()</a>, <a class="el" href="classeds_1_1arch_1_1_arch_client.html#ab4a3dd61df80a139b8790a3a2b600a23" title="Executes all queued report functions.">executeQueries()</a> and <a class="el" href="classeds_1_1arch_1_1_arch_client.html#ad492c5a85f5026d7e601981269520d93" title="Reads result (value, quality) from given report query id.">getResponse()</a> into a single method. </p>

</div>
</div>
<a class="anchor" id="a744cb3bb325e6b9c2d84cb67a299c6cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classeds_1_1arch_1_1_tabular_trend.html">TabularTrend</a>* eds::arch::ArchClient::getTabularTrend </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>function</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a <a class="el" href="classeds_1_1arch_1_1_tabular_trend.html" title="Represents a tabular trend with its parameters.">TabularTrend</a> object for a specific point and archive function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sid</td><td>- server identifier of point. Server identifiers can be obtained using <a class="el" href="classeds_1_1live_1_1_live_client.html#a3d9c9f50ca89e68c16843d298e85ace3" title="Returns server identifier of point.">eds::live::LiveClient::pointSID()</a> method. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">function</td><td>- name of base archive function to use in tabular trend (e.g. <em>VALUE</em>, <em>AVG</em>). Please consult EDS Terminal documentation for a list of available archive functions (remove the leading '@' character from function name). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>new <a class="el" href="classeds_1_1arch_1_1_tabular_trend.html" title="Represents a tabular trend with its parameters.">TabularTrend</a> object </dd></dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>Ownership of the created <a class="el" href="classeds_1_1arch_1_1_tabular_trend.html" title="Represents a tabular trend with its parameters.">TabularTrend</a> object is transferred to the caller. It must be released using the <code>delete</code> operator. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a16">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a6f576744e47f6625350963eedc16c93a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::addTabularTrend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classeds_1_1arch_1_1_tabular_trend.html">TabularTrend</a> *&#160;</td>
          <td class="paramname"><em>trend</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>shade_mode</em> = <code><a class="el" href="namespaceeds_1_1arch.html#a32e2fe0d83ab8f76bae8606995802373a7dfe4c28bb1e82c47a370c8ea6c976ca">ShadeMode_PreferRegular</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enqueues a tabular trend for execution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">trend</td><td>- tabular trend to execute </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">shade_mode</td><td>- specifies preference for regular archive values or shades </td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>Passed <a class="el" href="classeds_1_1arch_1_1_tabular_trend.html" title="Represents a tabular trend with its parameters.">TabularTrend</a> object must be already initialized with appropriate parameters. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a17">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad5df00ccc3877637c449d2f609ac42ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::executeTabularTrends </td>
          <td>(</td>
          <td class="paramtype">std::time_t&#160;</td>
          <td class="paramname"><em>ref_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>range</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes all queued tabular trends. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ref_time</td><td>- reference time (timestamp) for which to execute the tabular trend. This is usually the first timestamp of requested range. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">range</td><td>- total length (in seconds) of time range to fetch </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">step</td><td>- length (in seconds) of a single step </td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3</dd></dl>
<p>Archive Server will calculate <code>(range / step)</code> tabular trend rows. <a class="el" href="classeds_1_1arch_1_1_arch_client.html" title="Archive data client.">ArchClient</a> assumes that <code>(range % step == 0)</code>. If this constraint is not satisfied, resulting tabular trend may contain an extra row with undefined contents. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a18">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4a847796aea1483260664dfd30d6c5fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool eds::arch::ArchClient::fetchTabularTrendRow </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceeds_1_1arch.html#a1401dd12e8bc228f41b1688b4395d55b">TabularTrendRow</a> *&#160;</td>
          <td class="paramname"><em>row</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fetches a row of data from tabular trend and advances to the next row. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">row</td><td>- trend row object to be filled with data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if row was successfully fetched </dd></dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3 </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a19">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ad77604a1935e3570802ce3e29ee48969"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::addShadeValue </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::time_t&#160;</td>
          <td class="paramname"><em>start_ts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::time_t&#160;</td>
          <td class="paramname"><em>end_ts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>quality</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enqueues a shade to be written. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sid</td><td>- server identifier of point. Server identifiers can be obtained using <a class="el" href="classeds_1_1live_1_1_live_client.html#a3d9c9f50ca89e68c16843d298e85ace3" title="Returns server identifier of point.">eds::live::LiveClient::pointSID()</a> method. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">start_ts</td><td>- first timestamp of time range to write </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">end_ts</td><td>- last timestamp of time range to write </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>- value to write </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">quality</td><td>- quality to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3 </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a14">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4b4bd14fe7ae649f86693357f9d3a0d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void eds::arch::ArchClient::writeShades </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes all queued shades. </p>
<dl class="section since"><dt>Since</dt><dd>EDS 7.3 </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_arch_client_8cpp-example.html#a15">ArchClient.cpp</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceeds.html">eds</a></li><li class="navelem"><a class="el" href="namespaceeds_1_1arch.html">arch</a></li><li class="navelem"><a class="el" href="classeds_1_1arch_1_1_arch_client.html">ArchClient</a></li>
    <li class="footer">Generated on Tue Jul 31 2012 17:22:09 for EDS API by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.2 </li>
  </ul>
</div>
</body>
</html>
